/*! RD Station V2 - Thu Mar 27 2025 13:34:42 GMT+0000 (Coordinated Universal Time) */ var RdstationFormsIntegration=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=21)}([function(e,t,n){"use strict";var r=n(13),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function u(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===o.call(e)}function s(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n0},a=function(e){return e.replace(/[\s_-]/g,"").toLowerCase().indexOf("email")>-1},u=function(e){var t=[];return e.forEach((function(e){!e.name||e.disabled||["file","reset","submit","button"].indexOf(e.type)>-1||("select-multiple"!==e.type?["checkbox","radio"].indexOf(e.type)>-1&&!e.checked||t.push({name:e.name,value:e.value}):Array.from(e.options).forEach((function(n){n.selected&&t.push({name:e.name,value:n.value})})))})),t},c={findEmail:function(e){var t=e.filter((function(e){return"email"===e.name.toLowerCase()}));if(t.length>0)return t[0].name="email",!0;var n=!1;return e.forEach((function(e){!n&&function(e){var t=e.type,n=!!t&&"email"===t;return a(e.name)||n}(e)&&""!==e.value&&(e.name="email",n=!0)})),n||e.forEach((function(e){!n&&a(e.name)&&""!==e.value&&(e.name="email",n=!0)})),n||e.forEach((function(e){var t;!n&&(t=e.value,new RegExp(o).test(t))&&(e.name="email",n=!0)})),n},singleFields:function(e,t){var n=["password","submit","button","reset","checkbox","radio"],r=Array.from(e.querySelectorAll('select:not([multiple="multiple"]), textarea, input')).filter((function(e){return n.indexOf(e.type)<0}));return Array.from(r).filter((function(e,n){return i(e,n,t)}))},retrieveAllowedFields:function(e,t){var n=e.querySelectorAll('select, textarea, button, input:not([type="password"])'),r=Array.from(n).filter((function(e,n){return i(e,n,t)}));return u(r)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"RDIntegrationCookieConsent",(function(){return i}));var r=["cookieconsent_status_ANALYTICS","cookieconsent_status_ESSENTIAL","cookieconsent_status_MARKETING","cookieconsent_status_PERSONALIZATION","cookieconsent_status_UNCATEGORIZED"],o=function(e){return document.cookie.split(";").some((function(t){return 0===t.trim().indexOf("".concat(e,"="))}))},i={insertCookieConsentData:function(e){if(null===window.RDCookieControl.configuration)return e;if(!r.some(o))return e;var t={analytics:window.RDCookieControl.analytics.track,functional:window.RDCookieControl.functional.track,banner_type:window.RDCookieControl.configuration.type};return e.push({name:"privacy_data[browser]",value:JSON.stringify(t)}),e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(6),o=n.n(r),i=n(9);function a(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"https://event-api.rdstation.com.br/v2";c(this,e),this.publicToken=t,this.internalSource=n,this.eventApiUrl=r}var t,n,r;return t=e,r=[{key:"notifyError",value:function(e,t){new i.default(e,t).notify()}}],(n=[{key:"endpoint",get:function(){return 10===this.internalSource?"".concat(this.eventApiUrl,"/form_integrations"):"".concat(this.eventApiUrl,"/conversions")}},{key:"headers",get:function(){return{"Content-Type":"application/json",Authorization:"PublicToken ".concat(this.publicToken)}}},{key:"hasToken",value:function(){return void 0!==this.publicToken&&null!==this.publicToken&&""!==this.publicToken}},{key:"formattedPayload",value:function(e){return new u(e).getFormattedPayload()}},{key:"sendFormData",value:function(e){return this.hasToken()?o.a.post(this.endpoint,this.formattedPayload(e),{headers:this.headers}).then((function(e){if(f.includes(e.status))return e})).catch((function(e){return Promise.reject(e)})):Promise.reject(new Error("You must provide a valid public token"))}}])&&s(t.prototype,n),r&&s(t,r),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"FieldMapping",(function(){return f}));var r=n(1),o=n(10),i=[],a=function(e,t){var n,r,o="Field "+e+" "+t.type;return function(e){var t=e.name;return!!t&&t.replace(/\[/g,"_").replace(/\]/g,"")}(t)||!!(r=!!(n=t).labels&&n.labels[0])&&r.innerText.trim()||t.id||o},u=function(e){Array.from(e).forEach((function(e,t){var n=c(e.value)?Boolean(e.value):e.value,r=s(e);i.push({name:a(t,e),value:n,type:e.type,kind:r})}))},c=function(e){var t=""+e;return"true"===(t=t.toLowerCase())||"false"===t},s=function(e){var t="single";return"select-multiple"===e.type&&(t="multiple"),"checkbox"===e.type&&"multiple"===e.dataset.kind&&(t="multiple"),t},f={mapFields:function(e){return i=[],function(e){var t=r.FormFields.singleFields(e,{findFieldName:a});u(t)}(e),function(e){var t=Array.from(e.querySelectorAll('input[type="checkbox"]:checked:not([data-privacy])')).map((function(t){var n=t.cloneNode();return n.name=n.name.split(".")[0],void 0!==n.value&&!1!==n.hasAttribute("value")||(n.value=n.checked),e.querySelectorAll('input[name^="'+n.name+'"]:not([name~="."])').length>1&&(n.dataset.kind="multiple"),n}));u(t)}(e),function(e){var t=o.RDIntegrationDataPrivacy.findDataPrivacyCheckboxesFields(e);u(t)}(e),function(e){var t=e.querySelectorAll('input[type="radio"]:checked');u(t)}(e),function(e){var t=Array.from(e.querySelectorAll("select[multiple] > option:checked")).map((function(e){return e.name=e.parentNode.name,e.type="select-multiple",e}));u(t)}(e),i},findFieldName:a}},function(e,t,n){"use strict";n.r(t),n.d(t,"FormDebugger",(function(){return c}));var r=n(1),o={},i={},a=function(e){return i.fieldMapping&&(e=function(e){return e.forEach((function(e){var t=i.fieldMapping[e.name];t&&(e.name=t)})),e}(e)),e},u=function(e){o={identifier:{name:"identificador",value:""},token:{name:"token_rdstation",value:publicAccountToken}},e.forEach((function(e,t){var n=function(e){var t=a(e);return t.push(o.identifier,o.token,_getQueryParams()),t}(t),i=[];console.info(e+1+" formulario"),r.FormFields.findEmail(t)?console.info("Campo de email encontrado"):console.warn("Campo de email nao encontrado"),n.forEach((function(e){i.push(e.name)})),console.info("Campos mapeados: "+i.join(", "))}))},c={analyze:function(){i=i||{},console.info("Iniciando");var e=document.querySelectorAll("button[type=submit]"),t=e.closest("form:not([data-internal-rdstation-form])");0===e.length?console.warn("Nenhum botao de submit encontrado"):console.info("Botoes de submit encontrados: "+e.length),0===t.length?console.warn("Nenhum formulario encontrado"):console.info("Formularios encontrados: "+t.length),u(t),console.info("Finalizado")}}},function(e,t,n){e.exports=n(22)},function(e,t,n){"use strict";n.r(t),n.d(t,"ComarketingIntegrationHandler",(function(){return D}));var r=n(1),o=n(3),i=n(4),a=n(2),u=n(5),c={},s="",f={},l=null,d=function(e,t,n){c=n||{},s=e,t=t},p=function(){document.querySelector('input[type="submit"], button').addEventListener("click",m)},m=function(e){if(f=h(),l=v(e.target)){var t=r.FormFields.retrieveAllowedFields(l,i.FieldMapping);if(r.FormFields.findEmail(t)){var n=y(t);("function"!=typeof l.checkValidity||l.checkValidity())&&(w(n,(function(e,t){x()}),3),e.preventDefault())}}},h=function(){return{identifier:{name:"identificador",value:""},token:{name:"token_rdstation",value:s}}},v=function(e){return e.closest("form:not([data-internal-rdstation-form])")},y=function(e){var t=g(e);return t.push(f.identifier,f.token,b()),t},g=function(e){return c.fieldMapping&&(e=function(e){return e.forEach((function(e){var t=c.fieldMapping[e.name];t&&(e.name=t)})),e}(e)),e},b=function(){return{name:"query_params",value:location.search.substring(1)}},w=function(e,t,n){n=n||3,e=A(e),e=E(e),e=F(e),e=R(e,n),e=a.RDIntegrationCookieConsent.insertCookieConsentData(e),new o.a(s,n).sendFormData(e).then((function(e){t&&t(e.request,e)})).catch((function(e){console.error(e)}))},k=function(){var e=localStorage.getItem("formIntegrationDebugMode");(!0===c.debugMode||e)&&u.FormDebugger.analyze()},x=function(){if(_(l))l.submit();else{var e=l.querySelector('input[type="submit"], button');e&&(e.removeEventListener("click",m),e.click())}},_=function(e){var t=e.getAttribute("action");return void 0!==t&&""!==t.trim()},A=function(e){var t=S();return void 0!==t&&e.push({name:"client_id",value:t}),e},S=function(){var e=C("rdtrk");if(null!==e)return(e=JSON.parse(unescape(e))).id},C=function(e){var t,n,r=document.cookie.split(";");for(e+="=",t=0;t9),i^=1;return o%10==0&&o>0},hasCNPJName:function(e){return o.create(["cnpj"]).test(e)}},a={filter:function(e){return e.filter((function(e){return"true"!==e.sensitive})).filter((function(e){return!1===function(e){return i.validNumber(e.value)&&!i.hasCNPJName(e.name)}(e)})).filter((function(e){return!1===function(e){return o.create(r).test(e.name)}(e)}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(6),o=n.n(r);function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(t);try{for(o.s();!(r=o.n()).done;){r.value.addEventListener("click",w,!0)}}catch(e){o.e(e)}finally{o.f()}}}}))},x={integrate:function(e,t){var n;l=t||{},d=e,localStorage.getItem("RdIntegrationFormData")&&(n=JSON.parse(localStorage.getItem("RdIntegrationFormData")),y(n,(function(e){g(e)}),10)),k()}}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t),n.d(t,"RdIntegrationIdentifier",(function(){return i}));var o=function(e){return["squarespace.com","realty_ajax_shortcode_contact_form"].some((function(t){return function(e){var t=e.action;return"object"===r(t)?t.value:void 0!==t?t:""}(e).includes(t)}))},i={identifier:function(e){var t="/"===window.location.pathname?"home":window.location.pathname,n=e.getAttribute("name")||function(e){return!o(e)&&e.getAttribute("id")}(e)||t;return n.length>255?n.slice(0,255):n}}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(i)})),e.exports=c}).call(this,n(27))},function(e,t,n){"use strict";var r=n(0),o=n(29),i=n(14),a=n(31),u=n(34),c=n(35),s=n(18);e.exports=function(e){return new Promise((function(t,f){var l=e.data,d=e.headers;r.isFormData(l)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",h=e.auth.password||"";d.Authorization="Basic "+btoa(m+":"+h)}var v=a(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),i(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,f,r),p=null}},p.onabort=function(){p&&(f(s("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){f(s("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),f(s(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=n(36),g=(e.withCredentials||c(v))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}if("setRequestHeader"in p&&r.forEach(d,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),f(e),p=null)})),void 0===l&&(l=null),p.send(l)}))}},function(e,t,n){"use strict";var r=n(30);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,(function(e){void 0!==t[e]&&(n[e]=t[e])})),r.forEach(i,(function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):void 0!==t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):void 0!==e[o]&&(n[o]=e[o])})),r.forEach(a,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}));var u=o.concat(i).concat(a),c=Object.keys(t).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(c,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])})),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){n(7),n(4),n(5),n(1),n(11),n(9),n(2),n(8),n(10),n(12),e.exports=n(39)},function(e,t,n){"use strict";var r=n(0),o=n(13),i=n(23),a=n(19);function u(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var c=u(n(16));c.Axios=i,c.create=function(e){return u(a(c.defaults,e))},c.Cancel=n(20),c.CancelToken=n(37),c.isCancel=n(15),c.all=function(e){return Promise.all(e)},c.spread=n(38),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";var r=n(0),o=n(14),i=n(24),a=n(25),u=n(19);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},c.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}})),e.exports=c},function(e,t,n){"use strict";var r=n(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(0),o=n(26),i=n(15),a=n(16);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,s=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?s=c.concat(s):l=-1,s.length&&p())}function p(){if(!f){var e=u(d);f=!0;for(var t=s.length;t;){for(c=s,s=[];++l1)for(var n=1;n=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(20);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Integration",(function(){return c}));var r=n(5),o=n(3),i=n(11),a=n(2),u=n(7),c={integrate:function(e,t,n){u.ComarketingIntegrationHandler.integrate(e,t,n)},integrateAll:function(e,t){i.FormIntegrationHandler.integrate(e,t)},post:function(e,t,n){n=n||3,e=_insertClientId(e),e=_insertGoogleAnalyticsClientId(e),e=_insertCookieValues(e),e=_insertInternalSource(e,n),e=a.RDIntegrationCookieConsent.insertCookieConsentData(e),new o.a(void 0,n).sendFormData(e).then((function(e){t&&t(e.request,e)})).catch((function(e){console.error(e)}))},analyze:function(){return r.FormDebugger.analyze()}}}]);